.PHONY: dockerbuild pushimage


LDFLAGS = "-X 'router.BuildTime=${CURR_TIME}' \
-X 'crow-qin/router.BuildHost=${HOST_NAME}' \
-X 'crow-qin/router.GOVersion=${GO_VERSION}' \
-X 'crow-qin/router.GitLog=${GIT_LOG}' \
-X 'crow-qin/router.GitBranch=${GIT_BRANCH}' \
-X 'crow-qin/router.CrowVersion=${VERSION}'"

build:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -a -installsuffix cgo -ldflags $(LDFLAGS) -o ./crow-samba

flags:
	echo  $(LDFLAGS)

pushimage:
	docker build -t crow/crow-samba .

dockerbuild: build pushimage